<template>
  <div>
    <Category :disabled="isShow !== 'SpuList'"></Category>
    <SpuList v-if="isShow === 'SpuList'"></SpuList>
    <AddOrUpdateSpu v-if="isShow === 'AddOrUpdateSpu'"></AddOrUpdateSpu>
    <AddSku v-if="isShow === 'AddSku'"></AddSku>
  </div>
</template>

<script>
import AddOrUpdateSpu from "./components/addOrUpdateSpu";
import SpuList from "./components/spuList";
import AddSku from "./components/addSku";
export default {
  name: "SpuIndex",
  data() {
    return {
      isShow: "SpuList",
      visible: false,
    };
  },
  mounted() {
    this.$bus.$on("updateIsShow", this.updateIsShow);
  },
  methods: {
    updateIsShow(str) {
      this.isShow = str;
    },
  },
  components: {
    AddOrUpdateSpu,
    SpuList,
    AddSku,
  },
};
</script>

<style lang="scss" scoped></style>
